<script lang='ts' setup>
import { ref, onMounted, reactive } from 'vue'
import DictioanryTypeList from './component/dictionary-type-list.vue'
import { jumpPath } from '/@/utils/router-kit';
import { DictionaryTypeAddUrl } from '/@/views/org/mapping.json'
const DictioanryTypeListRef = ref();
const DictionaryTypeIndexState = reactive({
    /**
     * 新增按钮点击事件
     */
    onAddButtonClick: () => {
        jumpPath(DictionaryTypeAddUrl)
    },
    //删除时事件
    deleteTableData: () => {
        DictioanryTypeListRef.value.deleteTableData()
    }
})
onMounted(() => {
    //加载数据字典表格
    DictioanryTypeListRef.value.getDictionaryTypeListTableRef().loadTable()
})
</script>
<template>
    <jxtech-basic-header>
        <template #extra>
            <jxtech-add-button @click="DictionaryTypeIndexState.onAddButtonClick"></jxtech-add-button>
            <jxtech-delete-button @click="DictionaryTypeIndexState.deleteTableData"></jxtech-delete-button>
        </template>
    </jxtech-basic-header>
    <dictioanry-type-list ref="DictioanryTypeListRef"></dictioanry-type-list>
</template>